home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!austern
- From: "john (j.d.) hickin" <hickin@bnr.ca>
- Newsgroups: comp.std.c++
- Subject: Re: Correctness of compilers behavior
- Date: 14 Feb 1996 15:28:54 PST
- Organization: Bell-Northern Research
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <4ft9i9$sdm@bmtlh10.bnr.ca>
- References: <3122157A.2EB2@orbotech.co.il>
- NNTP-Posting-Host: isolde.mti.sgi.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Original-Date: Wed, 14 Feb 1996 18:27:21 +0000
- Content-Identifier: Re: Correctne...
- X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715)
- X-Url: news:3122157A.2EB2@orbotech.co.il
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMSJwQ0y4NqrwXLNJAQGZaQH+LIKvaILeD02obvGxuMedd8bLcTUr3jGA
- ZJ3FG9eyZrmYVfK3d5xQu8cMcg+1+eTJrFvJ0Zjgui5gTshrBPUkQA==
- =UJbQ
- Originator: austern@isolde.mti.sgi.com
-
- |> for (unsigned i=0; i<size; ++i) {
- |> (bptr+i)->~B();
- |> new(aptr+i) A;
- |> }
-
- I think this should be two loops, the first running backwards to destroy the
- B's and the second running forwards to create the A's.
-
-
- |> delete [] arr;
-
- 'delete p' and 'delete[] p' where 'p = new(...) whatever' may be undefined.
-
- --
- John Hickin Nortel Technology, Montreal, Quebec
- (514) 765-7924 hickin@bnr.ca
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
- in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
-